package io;

import java.io.*;

/**
 * 反序列化
 */
public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        //读出来
        FileInputStream fis=new FileInputStream("student.txt");
        ObjectInputStream ois=new ObjectInputStream(fis);
        Object obj=ois.readObject();
        Student zs=(Student)obj;
        System.out.println(zs);
        ois.close();

    }
}
